home *** CD-ROM | disk | FTP | other *** search
- XCOMM $XConsortium: sgiLib.rules,v 1.8 93/09/11 17:59:30 rws Exp $
-
- #ifndef HasSharedLibraries
- #define HasSharedLibraries YES
- #endif
- #ifndef SharedDataSeparation
- #define SharedDataSeparation YES
- #endif
- #define SharedCodeDef -DSHAREDCODE
- #define SharedLibraryDef -DATTSHAREDLIB
- #define PositionIndependentCFlags -G 0
-
- /*
- * SharedCplusplusLibraryTarget - generate rules to create a shared C++
- * library; use $(CXXLINK) instead of $(LD) in case the library needs
- * global constructors to be called.
- *
- * Not tested yet; send any bug fixes to fresco@x.org.
- */
- #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
- AllTarget(Concat(lib,libname.so.rev)) @@\
- @@\
- Concat(lib,libname.so.rev): solist @@\
- $(RM) $@ @@\
- $(CXXLINK) -o $@ $(SHLIBLDFLAGS) -h $@ solist need_libs @@\
- $(RM) Concat(lib,libname.so) @@\
- $(LN) $@ Concat(lib,libname.so) @@\
- @@\
- clean:: @@\
- $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
-
- /*
- * SharedLibraryTarget - generate rules to create a shared library;
- * build it into a different name so that the we don't hose people by having
- * the library gone for long periods.
- */
- #define SharedLibraryTarget(libname,rev,solist,down,up) @@\
- AllTarget(Concat3(lib,libname,_s)) @@\
- @@\
- Concat3(lib,libname,_s): sharedlib.o solist Concat(lib,libname.spec) @@\
- $(RM) $@ $@.a \ @@\
- && cd down \ @@\
- && mkshlib -s Concat(up/lib,libname.spec) -t up/$@ -h up/$@.a \ @@\
- && ar rs up/$@.a sharedlib.o @@\
- LinkBuildLibrary($@) @@\
- LinkBuildLibrary($@.a) @@\
- @@\
- clean:: @@\
- $(RM) Concat3(lib,libname,_s) Concat3(lib,libname,_s.a)
-
- #define SharedLibraryDataTarget(libname,rev,salist)
-
- /*
- * InstallSharedLibrary - generate rules to install the shared library.
- * NOTE: file must be executable, hence "INSTBINFLAGS"
- */
- #define InstallSharedLibrary(libname,rev,dest) @@\
- install:: Concat3(lib,libname,_s) @@\
- MakeDir($(DESTDIR)dest) @@\
- $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
- $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat3(lib,libname,_s) $(DESTDIR)dest
-
-
- /*
- * InstallSharedLibraryData - generate rules to install the shared library data
- */
- #define InstallSharedLibraryData(libname,rev,dest) @@\
- InstallTarget(install,Concat3(lib,libname,_s.a),$(INSTLIBFLAGS),dest)
-